#include <cstring>
#include <iostream>
#include <queue>
#include <vector>

using namespace std;

int n, m, k;
int src, dest;
int dist[20200];
bool vis[20200];

struct EDGE {
    int u, v, w;
    EDGE() : u(0), v(0), w(0) {}
    EDGE(int a, int b, int c) : u(a), v(v), w(c) {}
};

struct NODE {
    int ind, dis;
    NODE() : ind(0), dis(0) {}
    NODE(int i, int d) : ind(i), dis(d) {}
    bool operator<(const NODE &n1) const {
        return n1.dis < dis;
    }
};

void DIJKSTRA(vector<vector<EDGE>> &graph, int src) {
    priority_queue<NODE> pq;
    pq.push(NODE(src, 0));
    dist[src] = 0;
    while (!pq.empty()) {
        NODE u = pq.top();
        pq.pop();
        int n = u.ind;
        int d = u.dis;
        if (vis[n]) continue;
        vis[n] = true;

        for (int i = 0; i < (int)G[n])
    }
}

int main() {
    memset(dist, 0x7f, sizeof(dist));
    memset(vis, 0, sizeof(vis));
    cin >> n >> m >> k >> src >> dest;
    vector<vector<EDGE>> graph(n, vector<EDGE>(0));
    for (int i = 0; i < m; i++) {
        int p, q, w;
        cin >> p >> q >> w;
        for (int j = 0; j < k; j++) {
            graph[p + k * n].push_back(EDGE(p + k * n, q + k * n, w));
            if (j != k - 1) graph[p + k * m].push_back(EDGE(p + k * n, q + (k + 1) * n, 0));
        }
    }
}
